package com.rd.student.jiaji.class1.wangyufang.day0802;

public class TestClass {

    public static void main(String[] args) {
        Animal cat = Store.getInstance("cat");
        Animal dog = Store.getInstance("dog");
        Lady lady = new Lady("张女士", cat);
        Lady lady1 = new Lady("李女士", dog);
        System.out.print(lady.name + "," + "养了一只");
        lady.myPetName();
        System.out.print(",让这只猫");
        lady.myPetEnjoy();
        System.out.print(lady1.name + "," + "养了一只");
        lady1.myPetName();
        System.out.print(",让这只狗");
        lady1.myPetEnjoy();
    }
}
